summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2023-06-01 03:21:10 +0200
committerbunnei <bunneidev@gmail.com>2023-06-03 09:06:06 +0200
commit40e938376b55fc05c973b064bf35fa3a225881be (patch)
tree9b2aa6fa853439ac89799bdfd74b88fa79108087
parentandroid: ForegroundService: Handle null intent. (diff)
downloadyuzu-40e938376b55fc05c973b064bf35fa3a225881be.tar
yuzu-40e938376b55fc05c973b064bf35fa3a225881be.tar.gz
yuzu-40e938376b55fc05c973b064bf35fa3a225881be.tar.bz2
yuzu-40e938376b55fc05c973b064bf35fa3a225881be.tar.lz
yuzu-40e938376b55fc05c973b064bf35fa3a225881be.tar.xz
yuzu-40e938376b55fc05c973b064bf35fa3a225881be.tar.zst
yuzu-40e938376b55fc05c973b064bf35fa3a225881be.zip
-rw-r--r--src/audio_core/sink/sink_stream.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/audio_core/sink/sink_stream.cpp b/src/audio_core/sink/sink_stream.cpp
index 2331aaff9..b408fca89 100644
--- a/src/audio_core/sink/sink_stream.cpp
+++ b/src/audio_core/sink/sink_stream.cpp
@@ -273,9 +273,12 @@ void SinkStream::WaitFreeSpace() {
std::unique_lock lk{release_mutex};
release_cv.wait_for(lk, std::chrono::milliseconds(5),
[this]() { return queued_buffers < max_queue_size; });
+#ifndef ANDROID
+ // This wait can cause a problematic shutdown hang on Android.
if (queued_buffers > max_queue_size + 3) {
release_cv.wait(lk, [this]() { return queued_buffers < max_queue_size; });
}
+#endif
}
} // namespace AudioCore::Sink